home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / FROMUTS / XLISP1 / !XLisp / c / RiscSTUFF < prev    next >
Text File  |  1990-02-24  |  789b  |  55 lines

  1. /* Riscstuff.c - Risc specific routines */
  2.  
  3. #include "xlisp.h" 
  4.  
  5. /* external routines */
  6. extern int rand();
  7.  
  8.  
  9. /* osinit - initialize */
  10. osinit(banner)
  11.   char *banner;
  12. {
  13.     printf("%s\n",banner);
  14. }
  15.  
  16. /* osrand - return a random number between 0 and n-1 */
  17. int osrand(n)
  18.   int n;
  19. {
  20.     return((int)(rand()/4294967296.0 * (double)n));
  21. }
  22.  
  23. /* osgetc - get a character from the terminal */
  24. int osgetc(fp)
  25.   FILE *fp;
  26. {
  27.     return(getc(fp));
  28. }
  29.  
  30. /* osputc - put a character to the terminal */
  31. osputc(ch,fp)
  32.   int ch; FILE *fp;
  33. {
  34.     putc(ch, fp);
  35. }
  36.  
  37. /* oscheck - check for control characters during execution */
  38. oscheck()
  39. {
  40.     /* NIX */
  41. }
  42.  
  43. /* osfinit - initialize pc specific functions */
  44. osfinit()
  45. {
  46.     /* NIX */
  47. }
  48.  
  49. /* osfinish - cleanup before exit */
  50. osfinish()
  51. {
  52.     /* NIX */
  53. }
  54.  
  55.